'use strict';
const userRouter = require('./routers/user');
const messageRouter = require('./routers/message');
const homeRouter = require('./routers/home');
const searchRouter = require('./routers/search');
const envRouter = require("./routers/config");
const noteRouter = require("./routers/note");
const tagRouter = require("./routers/tag");
const uploadRouter = require("./routers/upload");
/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router } = app;
  router.all("/api/app/**", app.middlewares.auth(app) );
  userRouter(app);
  messageRouter(app);
  homeRouter(app);
  searchRouter(app);
  envRouter(app);
  noteRouter(app);
  tagRouter(app);
  uploadRouter(app);
};
